// pages/teacher/edit/index.js
import {
    editclass
  } from "../../../api/teacher";
Component({
    /**
     * 组件的属性列表
     */
    properties: {
        banjiId: String
    },

    /**
     * 组件的初始数据
     */
    data: {

    },

    observers: {
        banjiId: function (value) {
            if (value == undefined) return
            this.loadData()
        }
    },

    /**
     * 组件的方法列表
     */
    methods: {
        loadData: function () {
            let data = {
              banjiid: this.data.banjiId,
            }
            editclass(data).then(res => {
              console.log("okkk", res)
              let arr = res
              console.log(arr)
              this.setData({
                arr: arr,
              })
            })
          },

    }
})